import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'

Vue.use(Router)

const router = new Router({
  routes: [{
    path: '/hello',
    name: 'HelloWorld',
    component: HelloWorld
  }, {
    path: '/shoplist',
    name: 'shoplist',
    component: () => import('@/components/shoplist')
  }, {
    path: '/',
    name: 'home',
    component: () => import('@/views/home')
  }, {
    path: '/login',
    name: 'login',
    component: () => import('@/views/login')
  }, {
    path: '/shop/:id',
    name: 'shop',
    component: () => import('@/views/shop')
  }, {
    path: '/search',
    name: 'search',
    component: () => import('@/views/search')
  }, {
    path: '/confirmOrder',
    name: 'confirmOrder',
    component: () => import('@/views/confirmOrder')
  }, {
    path: '/addressList',
    name: 'addressList',
    component: () => import('@/views/addressList')
  }, {
    path: '/addAddress',
    name: 'addAddress',
    component: () => import('@/views/addAddress')
  }, {
    path: '/order',
    name: 'order',
    component: () => import('@/views/order')
  }, {
    path: '/mine',
    name: 'mine',
    component: () => import('@/views/mine')
  }, {
    path: '/type/:type',
    name: 'type',
    component: () => import('@/views/type')
  }, ]
})

export default router;
